package com.csd.service.impl;

import com.csd.mapper.CityMapper;
import com.csd.po.City;
import com.csd.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: CeSuDi_SSM
 * @description:
 * @author: 苏蕊
 * @create: 2020-12-22 18:42
 */
@Service
public class CityServiceImpl implements CityService {
    @Autowired(required = false)
    private CityMapper cityMapper;

    /**
     *
     * @param pid
     * @return
     */
    @Override
    public List<City> selectCitiesByPid(int pid) {
        List<City>  carCities = cityMapper.findCitiesByPid(pid);
        return carCities;
    }

    /**
     * 取车地址和还车地址
     * @param getid
     * @return
     */
    @Override
    public City getcityByGetid(int getid) {
        return cityMapper.getcityByGetid(getid);
    }
}
